import {createRouter, createWebHistory} from 'vue-router'

import Login from '../views/Login/index.vue'
import index from '../views/index/index.vue'
import report from '@/views/report/report.vue'
import category from '@/views/category/index.vue'
import user from '@/views/user/userList.vue'
import goods from '@/views/goods/goodList.vue'
import order from '@/views/order/orderList.vue'
import ad from '@/views/ad/index.vue'

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/', component: index,
            children: [
                {path: 'report', component: report},
                {path: 'category', component: category},
                {path: 'user', component: user},
                {path: 'goods', component: goods},
                {path: 'order', component: order},
                {path: 'ad',component:ad},
            ]
        },
        {path: '/login', component: Login}
    ]
})

export default router